package cn.kgc.ffzw.day14.src.cn.kgc;

import java.util.Scanner;

public class Person {
    String uName="admin";
    String oldPwd="123456";

    public void check(){
        System.out.println("请输入用户名");
        String name=new Scanner(System.in).next();
        System.out.println("请输入密码");
        String pwd=new Scanner(System.in).next();
        if (name.equals(uName)&&pwd.equals(oldPwd)){
            System.out.println("请输入新尼玛");
            String newPwd=new Scanner(System.in).next();
            System.out.println(uName);
            System.out.println(newPwd);
        }
        else {

            System.out.println("修改失败");

        }
    }
}
